﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Cloud.Model;
using Cloud.BLL;


public partial class Three_Managerment_Problem_PY_Bj : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["users"]==null)
        {
            Response.Write("<script>alert('登录超时，请重新登录！');location.href='login.aspx'</script>");
        }
        if (IsPostBack)
        {

        }
        else
        {

            int id = Convert.ToInt32(Request.QueryString["id"]);
            Problem activity = ProblemManager.FindById(id);
            this.sjid.Value = activity.Appealid.ToString();
           
        }
    }

    protected void Send_Click(object sender, EventArgs e)
    {
        Problem_historic2 his = new Problem_historic2();
        his.Blyj = this.con.Value;

        his.Bm2 = "";

        his.Idopen = this.sjid.Value;
        his.Title = " 回访，评价";

        his.Bm1 = ((USER_INFO)Session["users"]).DEPARTMENT;
        his.Item1 = 0;
        his.Item2 = "";
        his.Item3 = "";
        his.Name = ((USER_INFO)Session["users"]).USER_NAME;
        his.Times = DateTime.Now;
        his.Timese = new DateTime(1900, 01, 01, 00, 00, 00);
        // 04一级部门  05二级   06 三级



        int id = Convert.ToInt32(Request.QueryString["id"]);
        Problem activity = ProblemManager.FindById(id);

        activity.Satisfied = Convert.ToInt32(this.s_drop.SelectedItem.Value);
        if (ProblemManager.Update(activity) > 0)
        {
            Problem_historic2Manager.Save(his);
            Response.Write("<script>alert('处理成功！');location.href='List_dpy.aspx'</script>");
        }
    }
}